# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-pyodbc
_pkgname=pyodbc
pkgver=4.0.30
pkgrel=1
pkgdesc='DB API Module for ODBC.'
url='https://pypi.org/project/pyodbc/#files'
arch=('x86_64' 'aarch64')
license=('MIT')
depends=('python2' 'unixodbc')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('e7507d80134d5bf9a777d2454fb25d063dc0947e3f834d345b11aac1a10aadacbf8c2d29ccbb82ea6998fbe44dea125a2a179af2ea7642c8c839a439f02a7bf5')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

